package com.tianji.learning.domain.vo;

import com.tianji.common.domain.dto.PageDTO;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.util.List;

@Data
@ApiModel("查询学习计划外层数据")
public class LearningPlanPageVO extends PageDTO<LearningPlanVO> {

    @ApiModelProperty("本周学习积分")
    private Integer weekPoints;

    @ApiModelProperty("本周已学计划")
    private Integer weekFinished;

    @ApiModelProperty("本周总计划学习")
    private Integer weekTotalPlan;

    public LearningPlanPageVO() {

    }

    public LearningPlanPageVO pageInfo(Long total, Long pages, List<LearningPlanVO> list) {
        this.total = total;
        this.pages = pages;
        this.list = list;
        return this;
    }

    public LearningPlanPageVO pageInfo(PageDTO<LearningPlanVO> pageDTO) {
        this.total = pageDTO.getTotal();
        this.pages = pageDTO.getPages();
        this.list = pageDTO.getList();
        return this;
    }

}
